package xyz.zdsoft.course_manage_module.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.zdsoft.common.utils.Result;
import xyz.zdsoft.course_manage_module.bo.SelCourseInfoGch;
import xyz.zdsoft.course_manage_module.service.AdminTermSelCourseService;
import xyz.zdsoft.course_manage_module.vo.AdminCourseInfo;
import javax.annotation.Resource;

@RestController
@Api(tags = "管理员课程管理")
public class AdminTermSelCourseController {
    @Resource
    private AdminTermSelCourseService adminTermSelCourseService;
    @ApiOperation("条件查询课程信息(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页",example = "1",required = true),
            @ApiImplicitParam(name = "size",value = "每页数量",example = "5",required = true)
    })
    @PostMapping("/TermSelCourse")
    public Result<AdminCourseInfo> termSelCourse(Integer currentPage, Integer size, SelCourseInfoGch selCourseInfoGch){
        return Result.ok().message("查询成功").data(adminTermSelCourseService.termSelCourse(currentPage,size,selCourseInfoGch));

    }
}
